# -*- coding: utf-8 -*-
"""
author:码同学 极光
date:2023-06-05
desc: 
sample: 
"""

# a=1  #int
# b="11212" #string
# for item in b:
#     print(item)
# b[0]
# b[1]
#
# print(type(a))
#
# print(type(b))
# number = "20"
# data = int(number) * 3
# print(data)
#
# #List（列表）Tuple（元组）dict（字典） Set（集合）
arr1=["1","2","1"]
#arr[0]
# for item in arr1:
#     print(item)
#
# arr1.append("2")
# #数组模拟多个   重复 ，不重复
# print(arr1)
# arr2=set(arr1)
# print(arr2)
# for item in arr2:
#     print(item)
#
#arr3=tuple(arr1)
#arr3.append("3")

dic = {"name1":"zhangsan","age":10}
# print(dic["name"]) # 抛给系统
# try:
#     # 中断
#     print(dic["name"])
# except Exception as e:
#     print("出错了")

print(dic.get('name'))

for item in dic.keys():
    print(item,dic[item])
    #print(item, dic.get(item))

# print(type(dic.items()))
# for item in dic.items():
#     print(item[0],item[1])

for k,v in dic.items():
    print(k,v)




